@if($node->hasChildren() )


	@foreach($node->getChildren() as $children)
		@if($children->hasChildren())
		<li class="treeview">
                            <a class="waves-effect waves-dark" href="#!">
                                <i class="icon-arrow-right"></i>
                                <span>{{ $children->title }} </span>
                                <i class="icon-arrow-down"></i>
                            </a>

                            
                            <ul class="treeview-menu">
                                {!! Tree::nodeRender(Tree::model($children)) !!}
                            </ul>
                        </li>
        @else                
        	<li>
		    <a class="waves-effect waves-dark" href="{{ Tree::model($children)->uri }}">
		        <i class="icon-arrow-right"></i>
		            {{ $children->title }} 
		    </a>
		</li>
        @endif                

	@endforeach

@else
<li>
    <a class="waves-effect waves-dark" href="">
        <i class="icon-arrow-right"></i>
          {{ $node->title }}
    </a>
</li>
@endif







                       